import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;

public class Main {
    static int w, h;

    public static void main(String[] args) {
        boolean[][] arr = {
                {false, true, true, true, false, false, false, false, false},
                {false, true, true, true, false, false, true, true, false},
                {false, true, true, true, false, false, true, true, false},
                {false, false, false, false, true, false, true, true, false},
                {true, true, true, false, true, false, false, false, false},
                {true, true, true, false, false, false, false, true, false},
                {false, false, false, false, true, true, true, true, true},
                {true, true, true, false, false, false, false, true, false},
        };
        w = 9;
        h = 8;
        solve(arr);
    }


    public static void solve(boolean[][] arr) {
        int xmax = 0, ymax = 0, wmax = 0, hmax = 0, tx = 0, ty = 0, tw = 0, th = 0;
        for (int y = 0; y < h; y++) {
            for (int x = 0; x < w; x++) {
                if (arr[y][x]) {
                    tx = tx == 0 ? x : 0;
                    ty = ty == 0 ? y : 0;
                    th = 1;
                    tw++;
                } else {
                    if (tw > wmax) {
                        xmax = tx;
                        ymax = ty;
                        wmax = tw;
                        hmax = th;
                    } else if (tx == xmax && tw == wmax && tx > 0) {
                        hmax++;
                    }
                    tx = 0;
                    ty = 0;
                    th = 0;
                    tw = 0;
                }
            }
        }
        System.out.println(xmax + " " + ymax + " " + wmax + " " + hmax);
    }
}